function supports_video(){
	return !!document.createElement('video').canPlayType;
}	

function supports_video_mpeg4(){
	if(supports_video()){
		var v=document.createElement('video');
		var result= v.canPlayType('video/mp4; codecs="mp4v.20.8"');
		if(result=="probably"||result=="maybe")
			return true;
	}
	return false;
}

function supports_video_webm(){
	if(supports_video()){
		var v=document.createElement('video');
		var result= v.canPlayType('video/webm;codecs="vp8,vorbis"');
		if(result=="probably"||result=="maybe")
			return true;
	}
	return false;
}

function supports_video_h264(){
	if(supports_video()){
		var v=document.createElement('video');
		var result= v.canPlayType('video/mp4;codecs="avc1.42E01E,mp4a.40.2"');
		if(result=="probably"||result=="maybe")
			return true;
	}
	return false;
}

function supports_video_theora(){
	if(supports_video()){
		var v=document.createElement('video');
		var result= v.canPlayType('video/ogg;codecs="theora,vorbis"');
		if(result=="probably"||result=="maybe")
			return true;
	}
	return false;
}

function supports_video_poster(){
	return 'poster' in document.createElement('video');
}

function supports_video_track(){
	return 'track' in document.createElement('track');//��Ļ
}

function supports_video_autoplay(){
	return 'autoplay' in document.createElement('video');
}
///���ز��˰ɣ�����ȫ��֧�ֵ�����
/////

function start_video_test(container) {
	var E = 
	{
		layerName:	"Video Element",
		type:	"compo",
		nlist: {
			"Video Element"	: supports_video(),
			"Subtitle Support"	: supports_video_track(),
			"Poster Image Support"	: supports_video_poster(),
			"MPEG-4 Support": supports_video_mpeg4(),
			"H.264 Support"	: supports_video_h264(),
			"OGG Theora Support" : supports_video_theora(),
			"WebM Support"	: supports_video_webm()
		}
	}
	return E;
}

